home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / misc / mmulib / readme < prev    next >
Text File  |  1999-11-29  |  57KB  |  1,363 lines

  1. The mmu.library project © 1998,99 the mmu.library development group, THOR
  2. -----------------------------------------------------------------------------
  3.  
  4. Release 40.51.1
  5. -------------
  6.  
  7.     - disabled the layers.library kludge for MuGuardianAngel if V40
  8.       is found active. It is luckely no longer required.
  9.  
  10. Release 40.51
  11. -------------
  12.  
  13.     - fixed a bug in the 68060 startup logic which left the MMU disabled
  14.       in case it was disabled before. This made the custom 68060.library
  15.       useless.
  16.     - included the 40.17ß3 release of Carten Schlote's 68060.library
  17.       which (for the first time) makes use of the MMU.library.
  18.  
  19. Installation of this library requires some care as IT DOES NOT automatically
  20. auto-detect P5 hardware and special setup magic for this hardware. This is
  21. not because the library is "broken" in some sense, but because P5 didn't 
  22. follow the CBM guidelines when designing their hardware. Therefore, an
  23. experimental installation script has been written. This script must be
  24. run as follows:
  25.  
  26.     - Unpack the archive to disk,
  27.     - Enter the following commands:
  28.  
  29. cd <MMULib>/Install    ;where <MMULib> is the directory you unpacked this 
  30.             ;archive to
  31.  
  32. SYS:Rexxc/rx BuildMMUConfig.rexx ENVARC:MMU-Configuration
  33.  
  34.     - The last command builds the MMU configuration and writes it
  35.       to ENVARC:MMU-Configuration. It might also copy ScanMMUPort
  36.       to LIBS:MMU. This is an external setup command for the library
  37.       and might or might not be required. Older P5 hardware does *not*
  38.       require it (I would guess that this is explicitly for the 
  39.       Blizzards, but I'm not sure).
  40.       Non-P5 hardware will not require it at all.
  41.       You might want to hand-edit or optimize this script if you need,
  42.       as it will contain several optimizations for graphics cards and
  43.       other known boards.
  44.  
  45.     - KEEP THE OLD 68060.library IN A SAFE PLACE.
  46.     - Make sure to install the 40.51 edition of the mmu.library
  47.     - Copy the 68060.library to LIBS:
  48.     - Reboot the computer and wish the new library luck. (-:
  49.  
  50. This edition of the '060 lib does *not yet* include correct VMM management
  51. and FPU control functions (hence, C:FPU will not yet work). It is shorter
  52. and costs less memory because it leaves the MMU setup to the mmu.library.
  53. (Note that this release contains still debugging information).
  54.  
  55.  
  56. In case the installation failed:
  57.  
  58.     - Make sure the mathieedoubbas.library you're using is truely the
  59.       official 38.x or the patched and bugfixed 39.1. Some other third-
  60.       party products may fail to work correctly if the 68060 support
  61.       code is not yet loaded.
  62.  
  63. In case running the library fails (i.e. system doesn't boot):
  64.  
  65.     - Make sure LIBS:mmu/ScanMMUPort is really available at boot-up
  66.     - Please re-boot the computer without the startup-sequence,
  67.     - Keep ENVARC:MMU-Configuration in a safe place,
  68.     - Re-install the old 68060.library.
  69.     - Boot the computer again,
  70.     - Run "MuScan" and keep the output.
  71.  
  72. Then, please sent me the output of MuScan, and the ENVARC:MMU-Configuration
  73. file with a tiny note what exactly happened (or did not happen).
  74.  
  75.  
  76. Release 40.50
  77. --------------
  78.  
  79.     - added external command scanning in case a setup command is
  80.       not found "resident".
  81.     - included Richard Körber's PatchWork and Olaf Barthel's
  82.       Sashimi. The "PatchWork" edition is *NEW* and *NOT YET AVAILABLE*
  83.       otherwise. Big "thank you" to Richard for updating it for this
  84.       archive. Big thanks to Olaf Barthel for allowing me to include
  85.       his "Sashimi" in the archive.
  86.     - bumped the version number.
  87.     - Final release.
  88.  
  89. Release 0.48
  90. --------------
  91.     - mmu.library: Added a new command in the MMU-Configuration file,
  92.       "DescriptorCacheInhibit". It controls whether the MMU library
  93.       should disable the data cache for the descriptors. This is by
  94.       default OFF as this feature means more trouble for the library,
  95.       and is not required for using the library. However, this might
  96.       be a workaround for programs that hack the MMU table themselves,
  97.       which is not supported anyhow. Set it to "ON" if you MUST use
  98.       these programs.
  99.     - Added another VMM support function.
  100.     - MuGuardianAngel: The "memory header" output was broken, fixed.
  101.       Added more security checks, MuGuardianAngel will warn you in
  102.       case its function entries have been patched (which is not 
  103.       supported)
  104.     - MuGuardianAngel: Added automatic stack checking within the
  105.       memory allocation functions - an overrun stack seems to be the
  106.       most common source of MuGuardianAngel problems. MuGuardianAngel
  107.       will now detect an "nearly out of stack" condition in the memory
  108.       handling, and will provide an "emergency" stack in case this
  109.       happens. It will then generate a warning, regardless of whether    
  110.       stack snooping is enabled or not.
  111.       Interestingly, the RAM-Handler and the FastFilingSystem are the
  112.       most common sources of stack-overflows. This should be fixed for 
  113.       the RAM handler with "PatchRAM" in this archive, the FFS stack
  114.       should be added manually in the RDB, though. The smallest re-
  115.       commended stack size is 786 bytes, not less!
  116.     - P96: (yes, you read this correctly) supports now the mmu.lib if
  117.       it is available.
  118.     - Added an experimental GfxCard setup program to optimize cacheing.
  119.       This function is included in P96 anyhow, so not really required.
  120.  
  121.     - mmu.library: MOVE16 is now "sort of" supported, in the sense that
  122.       the exception handler will be able to handle it. However:
  123.       - MOVE16 is not supported by all Amiga hardware, it may crash,
  124.       - A MOVE16 on a 68040 is potentially dangerous due to a bug in
  125.         the CPU. A MOVE16 might invalidate cache lines which are not
  126.         related to the MOVE16 operation at all. There is currently a
  127.         workaround for this, namely: Do not set the "imprecise", or
  128.         "user page" bits 0-3 for swapped, invalid or supervisor only
  129.         pages. I do not guarantee that this workaround will remain
  130.         valid. *JUST DON'T USE MOVE16.*
  131.       - A MOVE16 may cause double reads, do not use this to read from
  132.         hardware registers that cannot tolerate this. Do NOT use it
  133.         at all!
  134.       - A MOVE16 which causes the exception handler to enter may be
  135.         completed by means of ordinary writes, which means that in
  136.         this situation no burst access is used, and the order of the    
  137.         data written out or read might be different from that of a
  138.         true MOVE16. *JUST DO NOT USE IT, OK!*
  139.  
  140.     - mmu.library: On read/modify/write accesses, the library might
  141.       have reported a write protection fault instead of a simple 
  142.       write fault on the write cycle of the instruction. Fixed.
  143.  
  144.     - MuGuardianAngel: Added more consistency checks, added checks
  145.       and support for memory pools, made some error messages more
  146.       informative.
  147.  
  148.     - MuMove4K: Added the NOREBOOT option to avoid unnecessary reboots
  149.       if the system is rebooted by a second program afterwards anyhow.
  150.  
  151.     - Included a patch for the V44 SetPatch.
  152.  
  153. Release 0.47
  154. --------------
  155.     - mmu.library: Changed again the cache control logic a bit. Please
  156.       try DMA transfers again. The new logic does not block interrupts
  157.       as long as the old logic, hence might avoid problems if fast
  158.       interrupt processing is required. It should be *slightly* faster
  159.       as well.
  160.     - MuForce: MuForce catches now supervisor exceptions as well if you
  161.       specify the "CAPTURESUPER" keyword. This requires patching of
  162.       some autovectors.
  163.     - Added a new drawer "Contributions", containing more tools from
  164.       other people I regard as very useful. This is "Sashimi" by
  165.       Olaf Barthel, and "PatchWork" by Richard Körber. Thanks Olaf,
  166.       thanks Richard for allowing me to include your great work!     
  167.     - Run all guides thru ISpell, hopefully correcting most typos.
  168.     - MuMove4K: The PREPAREEMUL option disabled the CPU instruction
  169.       cache. I expected the ROM would re-enable it somewhat later, but
  170.       it didn't. Fixed.
  171.  
  172. Release 0.46
  173. --------------
  174.     - mmu.library: Found that the "ramlib" task is really very low on
  175.       stack. I'm now swapping the stack on library startup to avoid
  176.       problems.
  177.     - updated the mmu.lib exception handler. It is now possible to use
  178.       the exception mechanism to auto-extend the stack and to keep the
  179.       user stack on virtual memory. The new "message hook" mechanism
  180.       does not require user stack space. However, an additional patch
  181.       to the exec switch function is required for this trick. This
  182.       patch is currently not included in the mmu.library - basically
  183.       because this is not directly MMU related.
  184.     - MuGuardianAngel will now stop to check for a valid free memory
  185.       counter if it finds a problem and reports the problem immediately.
  186.     - MuForce is now able to capture even "ordinary" MC68K exceptions.
  187.       This can be disabled with the new "NOGURUPATCH" option.
  188.     - Included a "synchronous" version of the 680x0.library because the
  189.       asynchronous outsmarted several systems.
  190.     - mmu.library: The chip ram is now by default marked as cacheinhibit 
  191.       imprecise nonserialized. This will speed up chip ram access a bit
  192.       for the 68060 and 68040. Works of course only if the MMULib is
  193.       used to setup the MMU tables, i.e. for users of the V40 68040 lib.
  194.       Video RAM of several graphics cards can be setup in the same way
  195.       as well, but since there's no way to identify expansion hardware as
  196.       video ram, you've to do that manually.
  197.     - mmu.library: The F-Space is now by default marked as cacheinhibit
  198.       to allow (IMHO misdesigned) hardware to map in here without telling
  199.       the system. This can be disabled by using the MMU-Configuration
  200.       file.
  201.     - Added a new MuTool: MuFastChip. This tool will enable the imprecise
  202.       or nonserialized cache mode for chip memory and will hence improve
  203.       chip memory access performance for systems where a third-party 040 
  204.       or 060 library does not setup the MMU tables in the optimal way.
  205.       The MMU.library (and hence the V40 68040.lib) *will* build its own
  206.       MMU tables with this feature enabled anyhow if it doesn't find an
  207.       MMU table to start from. 
  208.     - Fixed the SetPatch fix. (You kept the original, right? :-)
  209.       It might have been that the 43.7 edition installed a fix for the
  210.       mathieeesingbas.library even if this fix is unnecessary and fatal,
  211.       as it is for the 68881/68882 FPU.
  212.  
  213. Release 0.44
  214. --------------
  215.     - mmu.library:    The "AddMem" command in the MMU-Configuration file
  216.       was broken. Added the memory twice, causing nothing but a mess.
  217.     - Added a safety check for "AddMem", the command is now ignored
  218.       in case the memory in question is already added.
  219.     - "SetCacheMode" argument "valid" was broken and did not validate
  220.       the memory at all.
  221.     - AddMem'd memory was added after the MMU table setup, hence wasn't
  222.       used for the MMU descriptors. The library *tries now* to add it
  223.       as soon as possible to make some use of it for building the MMU
  224.       trees.
  225.     - MuFastZero: The FORCENATIVE option generated a failure code in
  226.       case the zero page wasn't remapped, stopping additional options
  227.       like MOVESSP from working.
  228.     - MuGuardianAngel: The "MemHeader free counter incorrect" error
  229.       handler did not save back one register and hence caused additional
  230.       hits.
  231.     - MuGuardianAngel: Ooops, found a problem of the RAM-Handler. Not
  232.       a MuGuardianAngel problem, but a real design fault of RAM: DO NOT
  233.       try to delete and write to the RAM: disk at the same time, this
  234.       will cause lots of trouble.
  235.     - Included a fix for the CBM mathieeedoubbas.library 38.2. This
  236.       library fails to compare floating point numbers below zero
  237.       correctly in some cases. The P5 library patches mathieeedoubbas
  238.       to fix this, but the 68040.library should not be a replacement
  239.       for SetPatch. To apply the patch,
  240.  
  241. 1)      Copy the file LIBS:mathieeedoubbas.library to RAM:
  242. 2)      Copy the file mathieeedoubbas.pch in the directory "Fixes" to RAM:
  243. 3)      Copy the "spatch" program at the same place to RAM:
  244. 4)      Change the directory to ram: with "cd RAM:"
  245. 5)      Apply the patch with    "spatch mathieeedoubbas.library"
  246. 6)      Copy the file RAM:mathieeedoubbas.new to
  247.         LIBS:mathieeedoubbas.library. It contains the fixed library.
  248.  
  249.     - In case the V40 68040.library slowed your computer down:
  250.       copy the file "MMU-Configuration" from the "ENVARC" drawer into
  251.       "ENVARC:". In case this causes crashes with Z-II memory, follow
  252.       the instructions in the file and remove one semicolon in front of
  253.       the "SetCacheMode" command. 
  254.     - Removed the debugging information from all files.
  255.     - Added the MMU master guide. Please check this, is this understand-    
  256.       able? In case I forgot to mention you in the credits, please let
  257.         me know!
  258.     - Moved all libraries to a separate directory, "Libs"
  259.     - Included a new library, the 680x0.library. This is the CPU
  260.       unspecific CPU driver. It's job is to detect which CPU is avail-
  261.       able in your system, and to load the CPU specific code. It there-
  262.       fore acts very much like the P5 68040dummy.library, except that
  263.       it remains in the system and provides user-callable function
  264.       entries for querying the CPU/FPU/MMU type and to setup the FPU
  265.       exceptions. The CPU specific library *should never be called
  266.       directly*, this library will re-route the calls to the correct
  267.       library. Furthermore, it loads the library in background, helping
  268.       to speed up the boot process a bit. 
  269.     - A special edition of SetPatch is available that loads the 680x0
  270.       library instead the 68040.library, regardless of which processor 
  271.       is available. The 680x0.library will then even try to load an
  272.       68000.library or 68020.library. This library could be used, for
  273.       example, to install line-F instructions to emulate the FPU 
  274.       completely in software, even for a 68020 or 68000 without FPU.
  275.       To patch "SetPatch", 
  276.  
  277. 0)    Keep a copy of SetPatch in a safe place.
  278. 1)      Copy the file C:SetPatch to RAM:
  279. 2)      Copy the file SetPatch.pch in the directory "Fixes" to RAM:
  280. 3)      Copy the "spatch" program at the same place to RAM:
  281. 4)      Change the directory to ram: with "cd RAM:"
  282. 5)      Apply the patch with    "spatch SetPatch"
  283. 6)      Copy the file RAM:SetPatch.new to C:SetPatch. This is the
  284.     inofficial 43.7 edition of SetPatch.
  285.  
  286.     - Included a new program, "FPU" in the "Shell only" drawer. This
  287.       program controls the exception generation of the FPU. It will
  288.       only work with the 680x0.library and the V40 68040.library
  289.       installed.
  290.  
  291.  
  292. Release 0.42
  293. --------------
  294.     - 68040.library: Only cosmetic changes. Added a AN_Zombie guru in
  295.       case the ColdReboot() function returned. I've no idea how this
  296.       could happen.
  297.     - mmu.library: I don't thrust the AFF_68060 flag any more. The
  298.       68060.library of the LC75 Apollo board does not set this bit
  299.       correctly and hence identifies the 060 as 040. Hence, the library
  300.       tried to install the wrong driver and crashed desparately. The
  301.       library tries now to identify an 060 in case at least an 040 is
  302.       indicated. The library updates then its own AttFlags copy 
  303.       correctly. Outch! I don't know whether this is a typo in the
  304.       sources of the 68060.lib, or this intended and something "sneaky"
  305.       I fail to understand. 
  306.     - Fixed one bug in the disassembler.library. It failed to disassemble
  307.       64 bit arithmetics correctly.
  308.     - MuFastRom: In case no argument is given, the program uses now the
  309.       default "On".
  310.     - MuFastZero: Again, made "On" the default argument. Added the
  311.       "MoveSSP" and "StackSize" arguments to relocate the supervisor
  312.       stack to fast ram. This does not make use of the MMU.
  313.     - Added the "CheckFPU" command, in the "Shell_Only" drawer. This
  314.       program prints the version number of a 68040 FPU if one is avail-
  315.       able. Two versions exist, the V40 "original" which is very buggy
  316.       and the V41 "revised" with less bugs. The 68040.library supports
  317.       currently both, with lots of workarounds for the V40. Please
  318.       contact me in case you find a V40 edition in your Amiga.
  319.     
  320.  
  321. Release 0.41
  322. --------------
  323.  
  324.     - Forgot to update the version number in 0.40. Reported 0.38. Oops.
  325.     - TTx parsing was still not 100% correct, but much better. Fixed.
  326.     - Due to a typo, branch cache flushes were effectively disabled.
  327.       Outch! Forgot one single "$".
  328.     - Added branch cache flushes on context switches, recommended by
  329.       Motorola.
  330.     - Added includes, autodocs and .fd files for the 68040.library.
  331.     - Updated MuFastZero and MuFastROM to include and set the cache
  332.       flags according to the mirrored RAM. This is of importance in
  333.       case non-cacheable Z-II fast RAM is used to build the mirror.
  334.     - Made mild modifications to the FPSP FPU emulator package to speed
  335.       it up a bit. The 40.1 release is now unnoticably faster than the
  336.       Mike Sinz 37.30 release, which is again unnoticably faster than
  337.       the P5 release.
  338.     - Added a workaround in GetMsg() to keep some brain-dead programs
  339.       working that call GetMsg() in a tight loop without giving
  340.       interrupts a chance to occur. These programs tend to block the
  341.       computer completely, especially if the ROM is remapped to 
  342.       cacheable, burstable memory. The workaround is a single NOP.
  343.  
  344. Release 0.40
  345. --------------
  346.     New in this release:
  347.  
  348.     - Added four internal undocumented LVOs for external CPU drivers.
  349.     - Fixed a bug in the CPU detection routine. A 060 EC or LC was
  350.       not recognized. Outch! Which smart guy at Motorola decided to use
  351.       the same processor ID for both products? The EC doesn't have a MMU,
  352.       the LC - as for example used by the LC75 Apollo board - does.
  353.       This might well explain a lot of problems of the Apollo board....
  354.     - Fixed a bug in the library init routine which would cause a guru
  355.       in case no MMU is available at all. The library MUST load, and
  356.       some functions will be available even without an MMU.
  357.     - Fixed several minor bugs of the TTx parsing routine, hopefully
  358.       correcting problems with some ancient 040 library releases that
  359.       didn't make use of the MMU (how should that work?)
  360.     - Fixed a serious bug of the Alert() replacement function, the stack
  361.       was used plain wrong. Thanks Etienne!
  362.     - Included an updated and more streamlined version of MuLockLib,
  363.       thanks to Gunther Nikl for providing it.
  364.     - Updated MuSetCacheMode, added more options.
  365.     - Added a configuration/preferences file and a preferences file
  366.       parser.
  367.     - Included now the "stripped" versions of the libraries in a sub-
  368.       directory of the same name. These editons don't contain the de-
  369.       bugging information and are therefore shorter.
  370.     - *News flash* 
  371.       This release comes with an upgraded version of the 68040.library.
  372.       This library is still in "beta" stage, but makes already use of
  373.       the mmu.library for the MMU configuration. It is for that reason
  374.       even shorter than the 37.30 release, even though it uses the latest
  375.       68040 FPU emulation code from Motorola.
  376.       FPU exceptions are configurable thru an LVO vector of the library,
  377.       but I haven't written a control tool yet. This will follow in the
  378.       next distribution.
  379.       This release *will only work* if the 37.30 runs on your machine,
  380.       you should, however, edit the ENVARC:MMU-Configuration file to 
  381.       to make some P5 boards working. The file should contain this line:
  382.  
  383. SetCacheMode    from 0x00f00000 size 0x00080000 valid iospace
  384.  
  385.       If you use this edition of the 68040.library, it might disable
  386.       caches for the Z-II address space completely. If this is not
  387.       desired, you may turn them on again with the following line in
  388.       the MMU-configuration file:
  389.  
  390. ClearTTX    
  391.  
  392. The path of the preferences file is ENV:MMU-Configuration or 
  393. ENVARC:MMU-Configuration if the first file is not found. The file looks like
  394. a standard shell script except that only three commands are known. All
  395. other commands are ignored silently for forwards compatibility, more might
  396. be made available in the future. The semicolon is used to separate comments 
  397. from the commands, the text following a semicolon is ignored.
  398.  
  399. The following three commands are available:
  400.  
  401. ClearTTX    ITT0/S,ITT1/S,DTT0=TT0/S,DTT1=TT1/S,ALL/S
  402.  
  403.     Controls the mmu.library use of the transparent translation registers.
  404.     By default, they are considered, their setup is added to the MMU
  405.     tree layout and they are cleared afterwards. Using this command,
  406.     several TTx registers can be made to be ignored (even though they
  407.     are still cleared because they are "in the way")
  408.  
  409.     ITT0        Ignore the instruction transparent translation 
  410.             register 0. (68040 and 68060 only).
  411.     ITT1        Ignore ITT1 (68040 and 68060 only).
  412.     DTT0        Ignore the data transparent translation register
  413.             number 0 (68040 and 68060) or the transparent
  414.             translation register 0 (68030).
  415.     DTT1        Ignore DTT1 (68040 and 68060) or TT1 (68030)
  416.     DTT0        Ignore DTT0
  417.  
  418.     ALL        Ignore all TTx registers. This is the default if
  419.             no other options are given.
  420.  
  421.     This command does nothing on a 68851 because this MMU doesn't offer 
  422.     transparent translation registers at all.
  423.  
  424.  
  425. AddMem        FROM=ADDRESS/A,LENGTH=SIZE/A,ATTR=FLAGS/K,PRI/K,NAME/K
  426.  
  427.     Adds memory to the exec memory pool. Note that THIS DOES NOT
  428.     make the memory available, i.e. it is NOT AUTOMATICALLY marked
  429.     as "valid". Hence, an "AddMem" command requires most likely a
  430.     "SetCacheMode" for the same memory region or the library will
  431.     crash on startup.
  432.  
  433.     FROM=ADDRESS    Base address of the memory to be added. in hex
  434.             notation. A leading $ or 0x is allowed.
  435.             This address must be aligned to a 64K boundary.
  436.  
  437.     LENGTH=SIZE    Size of the memory to be added in bytes, in hex.
  438.             Again, must be divisible by 64K.
  439.     
  440.     ATTR=FLAGS    Memory attribute flags in hex. Defaults to 0x05
  441.             which is MEMF_PUBLIC|MEMF_FAST. More flags are
  442.             documented in exec/memory.h. The library *does not*
  443.             know the nmemonics for the memory types, though.
  444.  
  445.     PRI        Priority of the memory pool to be added, in decimal
  446.             notation. This must be a number between -128 and 127. 
  447.             Defaults to six.
  448.  
  449.     NAME        Name of the memory pool. 
  450.             Defaults to "MMU expansion memory".
  451.  
  452.     Again, this command *does not* make the memory available for the
  453.     processor, an additional "SetCacheMode" is required.
  454.  
  455.  
  456. SetCacheMode    FROM=ADDRESS/A,LENGTH=SIZE/A,
  457.         COPYBACK/S,WRITETHROUGH/S,CACHEINHIBIT/S,
  458.         NONSERIAL/S,IMPRECISE/S,
  459.         VALID/S,BLANK/S,
  460.         IO=IOSPACE/S,NOIO=NOIOSPACE/S,
  461.         ROM/S,NOROM/S
  462.  
  463.     This is a "cut down" version of the "MuSetCacheMode" command, it
  464.     supports a sub-set of its cache control commands. Options that
  465.     modify memory in a way that could result in access errors are not
  466.     supported and must be setup by hand with "MuSetCacheMode".
  467.  
  468.     FROM=ADDRESS    The base address of the memory region whose cache
  469.             mode shall be changed. This is in hex notation, a
  470.             leading 0x or $ is allowed.
  471.             The library will round this down to the next
  472.             page size boundary, which is usually 4K or 1K.
  473.  
  474.     LENGTH=SIZE    The size of the memory region in bytes, in hex
  475.             notation. 
  476.             The library will round this up to the next page
  477.             size if required.
  478.  
  479.     COPYBACK    Enables the copyback cache mode. This is the
  480.             fastest cache mode available, reads and writes are
  481.             cached if the CPU allows this. This option will 
  482.             fall back to WRITETHROUGH on a 68030 or 68851.
  483.  
  484.     WRITETHROUGH    Enables the writethrough cache mode. Reads will
  485.             be cached, writes will enter the cache but will be
  486.             written out to memory as well.
  487.  
  488.     CACHEINHIBIT    Disables the cache completely.
  489.  
  490.     NONSERIAL    Disables the cache, but allows the CPU to reorganize
  491.             accesses to speed up memory transfers a bit. 
  492.             (68040 only, does nothing on all others).
  493.  
  494.     IMPRECISE    Disables the cache, but allows the CPU to handle
  495.             access errors a bit "sloppy" to speed up access a
  496.             bit. (68060 only, does nothing on all others).
  497.  
  498.     VALID        Validates the memory region, i.e. makes it available.
  499.             This option is required to enable a memory region
  500.             that should be added to the exec memory pool by the
  501.             "AddMem" command.
  502.  
  503.     BLANK        Invalidates the memory region, all accesses will be
  504.             remapped to a "dummy" page.
  505.  
  506.     IO=IOSPACE    Marks the memory region as mapped IO space, and
  507.             sets the cache mode to CACHEINHIBIT. The cache mode
  508.             can be overridden by using the cache control options.
  509.  
  510.             This is a pure software flag which is, however, used            
  511.             by MuForce and friends. Memory marked as IOSPACE is
  512.             never disassembled or dumped because of undesireable
  513.             side effects that might result.
  514.  
  515.     NOIO=NOIOSPACE    Marks the memory as plain RAM space, negative form of
  516.             IO=IOSPACE.
  517.  
  518.     ROM        Marks the memory as ROM space and enables the
  519.             defensive write protection. Writes to this area will
  520.             be ignored silently.
  521.  
  522.     NOROM        Marks the memory as RAM space, writes are allowed.
  523.             Negative form of NOROM.
  524.  
  525.  
  526. For example, to add non-autoconfiguring fast cacheable memory 
  527. from 0x02000000 to 0x03ffffff, setup your "MMU-Configuration" as follows:
  528.  
  529. SetCacheMode    from 0x02000000 size 0x01000000 valid copyback
  530. AddMem        from 0x02000000 size 0x01000000
  531.  
  532. --
  533. To disable the cache of autoconfiguring Zorro-II memory, as required by
  534. some 040 and 060 based boards that can't break up burst accesses into
  535. 16-bit Z-II accesses:
  536.  
  537. SetCacheMode    from 0x00200000 size 0x00800000 cacheinhibit
  538.  
  539. The GVP Combo 040 is an example for a board requiring this "adjustment".
  540.  
  541. --
  542. To mark non-autoconfiguring hardware in the F-Space as "IO space":
  543.  
  544. SetCacheMode    from 0x00f00000 size 0x00080000 iospace
  545.  
  546. Most P5 boards suffer from this design problem.
  547.  
  548.  
  549. Release 0.38
  550. --------------
  551.     New in this release:
  552.  
  553.     - Added four internal undocumented LVOs for external CPU drivers.
  554.     - Fixed a bug in the CPU detection routine. A 060 EC or LC was
  555.       not recognized. Outch! Which smart guy at Motorola decided to use
  556.       the same processor ID for both products? The EC doesn't have a MMU,
  557.       the LC - as for example used by the LC75 Apollo board - does.
  558.       This might well explain a lot of problems of the Apollo board....
  559.     - Fixed a bug in the library init routine which would cause a guru
  560.       in case no MMU is available at all. The library MUST load, and
  561.       some functions will be available even without an MMU.
  562.     - Fixed several minor bugs of the TTx parsing routine, hopefully
  563.       correcting problems with some ancient 040 library releases that
  564.       didn't make use of the MMU (how should that work?)
  565.     - Fixed a serious bug of the Alert() replacement function, the stack
  566.       was used plain wrong. Thanks Etienne!
  567.     - Included an updated and more streamlined version of MuLockLib,
  568.       thanks to Gunther Nikl for providing it.
  569.  
  570. Release 0.37
  571. --------------
  572.     New in this release:
  573.  
  574.     - Added two tags for Get/SetContextData in preparation for the
  575.       memory library.
  576.     - Wrote a replacement AddMemList() function because some 
  577.       versions of the 68040/68060.library functions patch this function.
  578.       This release will adjust the MMU tables for the DEFAULT CONTEXT
  579.       only, which means that all memory must be ready AT LEAST AS SOON
  580.       AS A PRIVATE CONTEXT IS CREATED.
  581.  
  582.  
  583. In case you've problems with this library release:
  584. o) Please install the mmu.library_debug ON TOP of the mmu.library, i.e. use
  585.  
  586. copy mmu.library_debug to LIBS:mmu.library
  587.  
  588. o) Reset the system
  589. o) Run Sushi or Sashimi to fetch the output. Give them a HUGE buffer
  590. o) Load the library. MuLockLib would do that, for example.
  591.  
  592. Release 0.36
  593. --------------
  594.     News in this release:
  595.  
  596.     - Fixed MuMove4K, added the A1200 option and fixed the shutdown code.
  597.     - Fixed MuLockLib, there was a slight chance for a crash (thanks to
  598.       Gunther Nikl for reporting)
  599.     - Fixed the .fd-File. I forgot to include two functions making
  600.       the table useless, and forgot to include one library 
  601.       function in the library lvo jump table. Outch!
  602.     - Fixed the new memory map functions.
  603.     - Tested indirect descriptor functions, included a new test,
  604.       see MuIndirectTest.
  605.  
  606. I'm planning to upload the 0.36 to the Aminet next saturday, I won't be in
  607. town from July 18th to August 8th. 
  608.  
  609. Release 0.35
  610. -------------
  611.     News in this release: Something in the library, even though no
  612.     real serious bugs have been found. More functions, but more power-
  613.     ful debugging tools.
  614.  
  615.     - Added support functions for memory maps, likely untested.
  616.     - Added support functions for indirect descriptors and *VERY FAST*
  617.       indirect page swapping.
  618.     - Fixed a tiny bug in the 060 support which might have failed to
  619.       detect physical bus errors correctly.
  620.     - Fixed a bug in GetPageProperties which might have failed to
  621.       read remapped memory correctly.
  622.     - Streamlined the tag item parse functions.
  623.     - Updated documentation and includes.
  624.     - Wrote the disassembler.library, added to the distribution.
  625.     - Updated MuForce: The program makes use of the disassembler.library
  626.       and prints now a disassembly of the faulty code on demand.
  627.     - Fixed a bug in MuGuardianAngel, stack dump was broken.
  628.     - Updated MuGuardianAngel, included disassembly function.
  629.     - Updated MuMove4K a lot, included a PREPAREEMUL function,
  630.       wrote a better guide, drew a shell icon.
  631.     - Included more shell tools, PrintBusError, ResetBusError and
  632.       ClearTTx.
  633.  
  634. The Apollo LC060 75Mhz showed problems with the mmu.library. I don't know
  635. how these problems arose, but it might be that the MMU doesn't like the over-
  636. clocking. To test this, please run the "ClearTTx" program with the NATIVE
  637. Apollo setup and check whether this works or not.
  638.  
  639. The PrintBusError tool will dump the bus error vector. It should always
  640. point to the library.
  641.  
  642. The ResetBusError will repair the bus error vector in case it was messed
  643. up by a program. It should be run WITHOUT an active debugger, or the result
  644. will be worse, not better. An application for this program is to restore
  645. the correct bus error handler after having used the "SoftBoot" program or
  646. "SetCPU FastROM" or "CPU FastROM". Note that the latter two are obsolete
  647. and replaced by MuFastROM.
  648.  
  649.  
  650. Release 0.34.1
  651. --------------
  652.     I'm pretty happy with the 0.34 how it is now, I haven't found new
  653.     bugs. This doesn't mean there are none, though. (-;
  654.  
  655.     New in this release:
  656.  
  657.     - Updated MuGuardianAngel a bit. The "hit" messages are now more
  658.       informative and contain more detailed information about the
  659.       cause of the hit, as for example which memory chunk was released
  660.       etc... Thanks to Simon for the hint.
  661.     - Added a new program "MuLink" to the MuTools. This is a shell-only
  662.       developer tool for automatic "self-protection" of software. A
  663.       program that gets "MuLink'd" will get its code (or other selected)
  664.       segments automatically write protected. This is most important 
  665.       for software that has to run on critical systems, as BBS's 
  666.       and the like. MuLink is a post-processing tool much like ATOM.
  667.       More about this tool in its documentation.
  668.     - Added a "MuGuardianOff" icon.
  669.     - Updated the documentation.
  670.     - Included E developer files, thanks to Daniel Kasmeroglu. 
  671.  
  672.  
  673. Remaining problems:
  674.     
  675.     - The usual ppc.library problem. Not about to be fixed.
  676.     - The library still refuses to work correctly on an Appollo 75Mhz
  677.       060EC board, I don't know why. TTx setup of this board is now
  678.       supported correctly, but this doesn't seem to help. Wierd.
  679.  
  680. Release 0.34
  681. ------------
  682.     Sigh, the 0.33 DMA logic was still buggy....
  683.  
  684.     - Fixed (another) bug in CachePostDMA(). The routine failed to
  685.       check the CPU AttnFlags correctly and hence did not restore
  686.       the cache mode to copyback. This could have been resulted in
  687.       slowdown of your machine, and hands of several MuTools.
  688.     - Removed all references to the 68040 and 68060.library. This
  689.       will allow a possible future 680x0 library to use the 
  690.       mmu.library to build its MMU tree instead of implementing this
  691.       function a second time.
  692.  
  693. I M P O R T A N T:
  694.  
  695. THIS MEANS THAT ALL THE MUTOOLS *MUST* BE RUN  A F T E R  SetPatch.
  696.  
  697. The only exception to this rule is MuMove4K.
  698.  
  699. Please DO NOT run the MMURemapTest with the cybscsi or cybppc.device. Both
  700. devices are not designed to allow memory remapping (not my fault). In worst
  701. case, they will trash your hard disk!!!
  702.  
  703.  
  704. Thanks goes to Ulrich Falke for helping me to find these bugs, and 
  705. furthermore to Michaela Prüß for supplying the includes and protos for the 
  706. vbcc compiler!
  707.  
  708. Release 0.33
  709. ------------
  710.     Outch, the 0.30 was buggy!
  711.  
  712.     - Fixed a bug in the GetPageProperties() routine for the 030 and
  713.       020 support code. The cache control functions overwrote an 
  714.       important CPU register and therefore crashed MuForce.
  715.     - Fixed a bug in the DMA control logic. Outch! This really broke
  716.       things!
  717.     - Fixed a bug in the MMU table rounding logic. Fixed one overflow
  718.       problem that makes the procedure hang on some machines. 
  719.       Additionally, I forgot to merge adjacent property nodes here.
  720.     - I must have been crazy to remove the PROTECT option in MuFastROM.
  721.       Fixed!
  722.     - MuFastZero OFF improved, and the FORCENATIVE flag was broken
  723.       completely.
  724.     - MuGuardianAngel showed a few bogus exceptions on startup, depends
  725.       on the system configuration. TRSaferPatches caused this, fixed.
  726.     - Added the FixCybAccess workaround. It fixes - or actually 
  727.       works around - a really bad design fault of the cybscsi.device.
  728.       More on this in its readme.
  729.     - Changed the SegTracker output style of MuForce and MuGuardianAngel
  730.       to the Enforcer style. This is most useful for tools interpreting
  731.       these lines.
  732.  
  733. Thanks to all the nice folks that reported bugs, and sorry for the 
  734. inconvenience about all the bugs.
  735.  
  736. This distribution contains again a "mmu.library_debug". In case you encounter
  737. problems, please rename this to "mmu.library", install "Sushi" or "Sashimi"
  738. with a *LARGE* I/O buffer and run the tests again. Alternatively, connect
  739. a terminal to the serial port, 9600 baud, 8 bit, 1 stop bit, no parity.
  740.  
  741. Please collect the output and sent it to my email address. This will help 
  742. me a lot debugging the library.
  743.  
  744. -----> When reporting bugs, PLEASE PLEASE let me know:
  745.  
  746. o) About which version of the library you're running. I might have sent
  747. some of you an updated version.
  748. o) About which processor your system is running on.
  749. o) A MuScan output.
  750. o) Which SCSI/IDE device you're using.
  751.  
  752. In case you see a crash:
  753.  
  754. o) Please write down the guru number.
  755. o) Try to reproduce the crash, try to find out which program causes the
  756. crash. This means that you should try to edit your startup sequence and to
  757. remove patches from there until the crash disappears. You don't need to
  758. strip the startup-sequence permanently, but just to let me know which
  759. program causes the incompatibility.
  760.  
  761. Please understand that a "It won't work on my computer" doesn't help me 
  762. much to fix the problem. Try to be as concrete as possible, this will 
  763. increase the propability enourmously that bugs get fixed. (-;
  764.  
  765. A special note about the 0.3x releases:
  766.  
  767. I introduced a new guru, namely "AN_PostSetup 0x3e000015". In case you see
  768. this specific guru, let me know which program caused this.
  769.  
  770.  
  771. A special note about MuGuardianAngel:
  772.  
  773. This program is NOT compatible with PoolMem. Try not to install PoolMem on
  774. top of this, this won't work. MuGuardianAngel will be smart enough to cancel
  775. PoolMem if it is running, but it is not smart enough to prevent its 
  776. installation.
  777.  
  778.  
  779. A special note about "version" and related utilities aka "verscheck":
  780.  
  781. These tools OPEN the libraries in question. Hence, if you run "version"
  782. on a - possibly existant - 68040old.library, it will open this library and
  783. re-install a MMU table on top of the already loaded table. Either do
  784. not try this or remove the 68040new.library and the 68040old.library from
  785. your LIBS: drawer.
  786.  
  787.  
  788. A special note about "MMUCacheTest": 
  789.  
  790. If this program hangs on your system, please report this. Furthermore, please
  791. run it *AGAIN*, but this time with the "NOMMU" option on the command line
  792. and *WITHOUT ANY* tools that require the mmu.library. It would be best to
  793. boot without startup-sequence, run "SetPatch" by hand and then immediately
  794. "MMUCacheTest DH0: nommu".
  795.  
  796.  
  797. Release 0.30
  798. ------------
  799.     Ouh, just too many changes to mention:
  800.  
  801.     - Added tags to setup the MMU table layout, as the page size,
  802.       the depth of the MMU tree.
  803.     - Added functions to get and set some control values of the
  804.        MMU contexts.
  805.     - Added page access exception handler.
  806.     - CachePre/PostDMA patches are now always installed since 68020
  807.       and 68030 based systems need the logical -> physical trans-
  808.       lation as well.
  809.     - Reworked the mmu.library memory management.
  810.     - Fixed several bugs in the MuForce program, did not handle ROM
  811.       remapping correctly.
  812.     - MuFastRom and MuFastZero reworked a bit. MuFastZero OFF did
  813.       not work. Added more options for both tools.
  814.     - Added a new debugging tool: MuGuardianAngel. Some sort of
  815.       memory protection that keeps free memory from getting over-
  816.       written by faulty programs.
  817.     - Added more options to MuSetCacheMode.
  818.     - MuMove4K moves now the lowest 32K (and is hence misnamed). This
  819.       avoid trouble with large MMU table sizes on 68030/68020 based 
  820.       systems and pre-allocates memory for an "oxypatcher" type tool.
  821.     - Added MuLockLib tool, check the readme.
  822.     - ....
  823.  
  824.  
  825. Release 0.27
  826. ------------
  827.     - Fixed a bug in the task scheldurer.
  828.     - Added a second explicit cache flush for ColdReboot()
  829.     - Fixed a bug in the branch cache flush of the '060... Sorry!    
  830.     - Tested the library for public remapped memory... Works!
  831.     - Tested the library for private MMU trees... Works!
  832.  
  833.     - Since the 0.27 works now within its specifications, this will
  834.       be the last 0.2x release. We're going to 0.30 now.
  835.  
  836. Release 0.26
  837. ------------
  838.  
  839.     - Fixed a bug in the exception handling, forgot to restore a6.
  840.     - Fixed the return value of RebuildTree(). It's now TRUE on
  841.       success, not DOSTRUE.
  842.     - Fixed a bug in the table builder, merged sub-tree were released
  843.       incorrectly.
  844.     - Added the WithoutMMU() LVO entry.
  845.     - Removed the AllocLineMem() LVO, this one was useless.
  846.  
  847. Release 0.25
  848. ------------
  849.  
  850.     - Debugged 060 exception handler again. Found only one bug, ROM
  851.       emulation was broken.
  852.     - Enhanced AbsExecBase accesses - does no longer block interrupts
  853.       unnecessary.
  854.     - Fixed parts of the exception handler to read the faulty instruction
  855.       from the correct function code space.
  856.     - Added a complicated test for the EC030 processor that should
  857.       finally work.
  858.     - Enabled the MMULib internal exception handler test.
  859.     - Removed all accesses to the ppc.library and reserved entries.
  860.       PPC.lib compatibility is no longer an issue for me. The MMU.lib
  861.       is WarpOs-compatible, though, as long as the system isn't 
  862.       infected by Ralph's "software".
  863.     - Added a safety test in the MMUCacheTest program to avoid
  864.       hangs.
  865.  
  866. Release 0.24
  867. ------------
  868.  
  869.     - Fixed the 030/851 exception handler, especially the emulation
  870.       of instruction access of a possibly invalidated zero page,
  871.       now really, *BIG* thanks to Dave!
  872.     - MuForce does no longer ignore a remapped ROM. (Oops!)
  873.     - MuForce does no longer touch the mapping of the fspace
  874.       unless told to do so.
  875.     - Fixed the assembler includes and autodocs, thanks to Tilman!
  876.     - The context management of the library does no longer
  877.       reset the remap destination in case the memory remap flag
  878.       is not included in the mask settings. (Oops!)
  879.     - Fixed the MMU table builder for MMU tables using more than
  880.       32K entries.
  881.     - The startup code selects now a better page layout for 030/851
  882.       processors.
  883.     - MuForce tries now to re-use an already relocated vector base
  884.       if possible.
  885.     - Tiny speedup in the "InstallDescriptor" routine could speed up
  886.       MMU table building. There's room for more speedups, though.
  887.     - Added a "nommu" flag for the MMUCacheTest program to check    
  888.       your HD without the mmu.library. If this flag is used, the
  889.       program *MUST* be run without the mmu.library currently loaded.
  890.  
  891. Related fixes of COP (release 1.73, not included in this distribution):
  892.     - Fixed emulation of instruction access to the zero-page.
  893.     - Fixed the RestoreVBR option.
  894.     - Fixed the MMU disable mechanism on startup.
  895.  
  896. Special thanks goes to Dave "Ragman" for finding a lot of bugs in the 0.21
  897. release.
  898.  
  899. -----------------------------------------------------------------------------
  900.  
  901. Compatibility warnings and bad software:
  902.  
  903. - The MMU tables generated by the "CPU FastROM" command, an official CBM tool,
  904. are simply wrong if run on a 030 processor. Chip memory is marked as
  905. "cacheable", which is plain wrong. Already spoke to Michael Sinz who agrees
  906. in that point. Don't use it, run "MuFastRom" instead.
  907.  
  908. - The MMU tables build by "SetCPU FastRom" are not very well suited for 
  909. MuForce. The MMU library will replace the table layout by something more
  910. adapted.
  911.  
  912. Since these programs may install a "bogus" exception vector, you shouldn't
  913. run both programs with the "FastROM" option. If you absolutely want to do, 
  914. run them *before* installing any MMU.lib related program and COP - remember, 
  915. you have been warned. "MuFastROM" will do better once the library is finished.
  916.  
  917.  
  918. - CMQ060.lha from the Aminet: This program uses the MOVE16 instruction to
  919. "speed up" the copy mem routines of the Os. Besides that the speedup is
  920. minimal, you should be informed that this instruction is not fully 
  921. supported by the Amiga hardware. A MOVE16 into the chip memory could yield
  922. to "strange and wonderful things", and may or may not work. Its burst
  923. accesses simply don't fit into the DMA access mechanism of the Amiga 
  924. custom chips. (Note that no other instruction will try burst accesses
  925. into non-cacheable memory!)
  926. Moreover, if a MOVE16 crashes, the mmu.library is out of buisiness, it will 
  927. simply guru. Moreover, due to a firmware bug of the '040, a MOVE16 on a
  928. system using virtual memory might be unreliable and cause undesired side
  929. effects. Do not run this program!
  930.  
  931. MOVE16 is one of the non-supported instructions in an Amiga system, others
  932. are TAS, CAS and CAS2 (which are of little use in a single processor system).
  933.  
  934. For more detailed information of MOVE16, check either the enforcer.guide or
  935. the motorola documentation, I'm not making this up, and this is not 
  936. mmu.library related.
  937.  
  938. Known Bugs:
  939. -----------
  940.  
  941.     The MMU table manager rebuilds currently the MMU tables for a
  942.     complete memory block even if only a minor sub-block was changed.
  943.     Therefore, it may take longer to build the MMU table than absolutely
  944.     required. I decided not to change this behaiviour because it
  945.     keeps the mmu tables clean and optimized and avoids fragmentation.
  946.  
  947.     The MMU library builds currently 68030 MMU tables with the
  948.     REPAIRABLE flag set less efficient than it could. However, it 
  949.     was felt that a consistent table layout is more helpful than the
  950.     (minimal) speedup.
  951.  
  952.     The library does not yet contain a workaround for a 040 firmware
  953.     bug: If an illegal, line A, chk or unimplemented floating point
  954.     instruction is located at the last 16 bits of a page and the next
  955.     page is not available, the 040 generates an access fault instead
  956.     of the proper exception. The fault address is the address of the
  957.     missing page, and the PC points to the instruction in the preceeding
  958.     page. This doesn't matter too much currently, it might become
  959.     relevant in a VM system.
  960.  
  961.     The library does not provide the MOVE16 instruction of the '040 and
  962.     '060. See above for details. It does not work around the MOVE16
  963.     firmware bug causing loss of cached data on MOVE16's into invalid
  964.     memory, and it reacts with a guru in case a MOVE16 generates an
  965.     access fault.
  966.  
  967.  
  968. These bugs will be fixed within the next releases of the library, including
  969. all the other bugs you may find.
  970.     
  971. -----------------------------------------------------------------------------
  972.  
  973. Special thanks goes to:
  974.  
  975. -Ralph Babel for giving information about the CachePreDMA/CachePostDMA
  976.  functions and for some internals allowing me to write the MuOmniSCSIPatch.
  977. -Carsten Schlote for starting development of a mmu.library aware 68060.lib.
  978. -Michael Sinz (a real BIG thank you!) for discussing a lot of details of
  979.  CachePreDMA/CachePostDMA, for sending me the sources of these functions
  980.  in his 68040, and especially - and that's really great - for making the
  981.  Enforcer sources available and for allowing me to reuse the exception
  982.  handler of the Enforcer. This will happen in one of the next releases.
  983. -Bjoern Schmidt for allowing me to run some tests on his 060 and for
  984.  keeping several afternoons free for me.
  985. -All the testers for running tests and sending me detailed information about
  986.  their systems.
  987.  
  988. Thank you to all of you, this project won't clearly possible without your
  989. support!    
  990.  
  991. -----------------------------------------------------------------------------
  992.  
  993. What is this:
  994. -------------
  995.     The mmu.library provides functions for MMU related operations
  996.     as write- or read-protecting certain areas of memory for a
  997.     given set of tasks, or marking memory regions as "swapped"
  998.     virtual memory support. It offers an abstraction level on top
  999.     of the actual MMU and a unified interface for MMU purposes.
  1000.  
  1001.     The MMU lib does NOT implement virtual memory, that's the purpose
  1002.     of another library - the memory.library. There's no much reason why
  1003.     any application except the memory.library and probably some debugging
  1004.     tools should call this library directly. The memory.library functions
  1005.     on top of this library should suffer for "all day purposes".
  1006.  
  1007.     The goal of the mmu.library is to provide an "abstraction layer" on
  1008.     top of the hardware, to allow programs to make use of the memory
  1009.     management hardware of the more advanced members of the MC68K
  1010.     processor family. Programs using the functions of the mmu.library
  1011.     do not need to modify the MMU tables directly and hence will not
  1012.     conflict with each other. The mmu.library interface provides all
  1013.     necessary functions to do that. This will allow programs like
  1014.     Enforcer and VMM to cooperate nicely with each other, provided both
  1015.     use this library.
  1016.  
  1017. Since writing the mmu.library is a tough job, I need your help!
  1018.  
  1019. Currently, only two systems are available right here, a MC68030 40Mhz
  1020. ad a MC68040 33Mhz. While this is better than before, I still need your
  1021. help since the library is supposed to support all members of the MC68K
  1022. family (the 68851, 68040 and 68060 MMUs). 
  1023. Since I don't have all these systems available, I need your
  1024. help - writing system software without being able to debug is "a bit" 
  1025. tricky.
  1026.  
  1027.  
  1028. What can I do as a non-developer:
  1029. ---------------------------------
  1030.  
  1031. Testing! Check the documentation of the programs within the documentation,
  1032. especially what you find the "MuTools" drawer, and lemme know how it goes.
  1033.  
  1034. More shell-based tests are in the "Shell_Only" drawer:
  1035.  
  1036. I) First test
  1037. --------------
  1038.  
  1039. Please run the MMUCacheTest program, too. It takes one argument, the
  1040. name of a hard disk. Don't worry, it won't harm your HD, it will simply
  1041. read sectors from it to test some critical MMU.library functions.
  1042.  
  1043. Please perform this test with as many "disk-like" devices as you can, i.e.
  1044. hard disks, CD Roms, SCSI and IDE devices of various kinds.
  1045.  
  1046. Here's an example run:
  1047.  
  1048. 1.SYS:> MMUCacheTest DH0: <RETURN>
  1049.  
  1050. MMUCacheTest 0.25 (14.03.99) © THOR.
  1051. Internal use only, no commercial use.
  1052. Initial read, calculate checksum.
  1053.  
  1054. Running the initial device test.
  1055. This test checks whether the connected device works reliable.
  1056. It does NOT check the MMU code which is not needed for this
  1057. initial run.
  1058. This test SHOULD NOT fail. In case it does, your device or
  1059. host adapter is broken, but not the MMU logic.
  1060.  
  1061. The initial test passed.
  1062.  
  1063. Running the real test. If this test fails, something is wrong
  1064. with the CachePreDMA/CachePostDMA logic. In this case, please
  1065. sent me an EMail so I can fix it.
  1066. The MMU cache test passed. Run 165329 RAM accesses.
  1067.  
  1068.  
  1069. In case any of the tests fail, or you see crashes, please let me know.
  1070. THIS IS AN IMPORTANT TEST. If anything fails here, the future mmu.library
  1071. might trash disk input.
  1072.  
  1073. If the tests pass, check the number of RAM accesses shown in the last line
  1074. of the output. This number *should* be larger than zero. If it's not, then
  1075. the test did effectively nothing. Please let me know in this case either,
  1076. I'll try to invent a more effective test in this case.
  1077.  
  1078.  
  1079. II) Second test
  1080. ---------------
  1081.  
  1082. Please run the MuContextTest program. It should not crash, but should
  1083. output the following:
  1084.  
  1085. 8.VIF:MMULib> Shell_Only/MuContextTest
  1086. A silly test.
  1087. A silly test.
  1088. B silly test.
  1089. C silly test.
  1090. D silly test.
  1091. E silly test.
  1092. F silly test.
  1093. G silly test.
  1094. H silly test.
  1095. I silly test.
  1096. J silly test.
  1097.  
  1098.  
  1099. This test checks whether the library context switch routine works correctly.
  1100. This is most important for the 68020/68851 since it is most sophisticated
  1101. for this hardware configuration.
  1102.  
  1103.  
  1104. III) Third test
  1105. ---------------
  1106.  
  1107. Please run this test LAST since it can't be aborted. The program is run
  1108. with one parameter, the name of a temporary file. Please DO NOT use a file
  1109. on the RAM or RAD since this won't test much, and DO NOT use the floppy
  1110. drives for the same reason. The optimal choice is an external medium like a
  1111. ZIP or a JAZ drive. This test checks mainly the device driver of your hard-
  1112. disk whether it is written MMU conformal or not. Users of the omniscsi.device
  1113. (the Guru ROM) should install the "MuOmniSCSIPatch" or the answer will be
  1114. "No".
  1115.  
  1116. Please run the test as follows:
  1117.  
  1118. 1.SYS:> MuRemapTest SYS:TempFile
  1119.  
  1120. The program will print the result on the screen.
  1121.  
  1122.  
  1123. If this test succeeds, the program will attempt to remap free exec memory
  1124. to a new position and builds a new memory pool. This memory will therefore
  1125. have different physical and logical addresses. Please try now whether your
  1126. system remains stable, but do not yet run MuGuardianAngel as it does not yet
  1127. support memory remapping.
  1128.  
  1129. The program can't be aborted since the remapped memory can't be released
  1130. if parts of it got allocated.
  1131.  
  1132.  
  1133. What can I do as developer:
  1134. ---------------------------
  1135.  
  1136. I'm still willing to give away the sources of the library, provided that
  1137.  
  1138. a) you keep them private and don't give them away (really!)
  1139. b) you help me debugging the library by using them.
  1140.  
  1141. They are no longer included in the "standard" distribution because that
  1142. would enlarge the archive unnecessary for most testers. In case you're
  1143. interested, just sent me a note.
  1144.  
  1145. Under the same restrictions, the MuGuardianAngel sources are available.
  1146.  
  1147.  
  1148.  
  1149. What about joining the mmu.library development group? This is just a couple
  1150. of people contributing to this library by writing code and exchanging their
  1151. wisdom by EMail. It's a non-profit organization that works on the development
  1152. of this library. If, whenever, this library becomes a commercial product, 
  1153. you'll get paid, of course. However, the current library, as it is, is planned
  1154. to be freeware, so don't expect money. It doesn't look like there's currently
  1155. a market for this library project, unfortunately. 
  1156.  
  1157. Contact me at thor@math.tu-berlin.de if you want to join this group.
  1158.  
  1159.  
  1160. What can be done just now is to run this library on your machine and find
  1161. and correct bugs. As I said, I haven't tested the 68851 and the 68060
  1162. parts at all. 
  1163.  
  1164. You might also want to develop software for the library. You find the
  1165. required includes and autodocs within this archive, as well as example
  1166. sources. In case you need support, just contact me.
  1167.  
  1168. There are a lot of library functions that require a bit more testing:
  1169.  
  1170. - All the functions that bypass the abstraction layer:
  1171.  
  1172.     GetPageProperties(),SetPageProperties(),PhysicalPageLocation()
  1173.  
  1174. - Remapping of memory and adding this memory to the exec memory pool.
  1175. - Building private contexts and swaps of the MMU tables on task swaps.
  1176. - SWITCH and LAUNCH type exception handlers.
  1177.  
  1178. I haven't been able yet to run all required tests, sorry. 
  1179.  
  1180.  
  1181. What is in this distribution:
  1182. -----------------------------
  1183.  
  1184. Autodocs:
  1185.     The preliminary version of the autodocs of the mmu.library and
  1186.     the memory library, as well as a file describing some planned
  1187.     implementation details.
  1188.  
  1189. Include:
  1190.     The includes for a C compiler as well as the ".fd" file for the
  1191.     library functions written so far. 
  1192.  
  1193. C_Sources:
  1194.     C sources of sample programs. All programs that are distributed
  1195.     under the THOR-Software licence are published here. The
  1196.     sources of MuForce *are not* available because they are partially
  1197.     copyrighted by Michael Sinz.
  1198.  
  1199. MuTools:
  1200.     Contains an increasing collection of programs that make use of 
  1201.     the MMU. For details, check their guides in this drawer.
  1202.  
  1203. Shell_Only:
  1204.     A couple of programs that can be run from the shell only, as there
  1205.     are:
  1206.  
  1207.     MMUCacheTest:
  1208.         Reads from HD, partially non-cache aligned to check whether
  1209.         boundary pages of the DMA buffer are correctly marked as non-
  1210.         cacheable. See above for how the test looks like.
  1211.  
  1212.     SCSIDMATest:
  1213.         Checks whether the hard disk driver uses CachePreDMA/CachePostDMA
  1214.         consistently. See above for the test. The source is included.
  1215.  
  1216.     TestMMU:
  1217.         This program is purely for debugging purposes. If you run it,
  1218.         you won't see any specific action. It simply opens the library
  1219.         manually and executes the library init function in the task
  1220.         context of the calling program. Hence, this program can be used
  1221.         to step thru the lib-init function with a standard debugger
  1222.         without the need to catch "ramlib".
  1223.         If you still discover bugs and want to try, then load this
  1224.         program into a debugger of your choice, and step thru it.
  1225.  
  1226.     PrintTTX:
  1227.         Prints the transparent translation registers, without using
  1228.         the library. Sometimes required by me if the library fails
  1229.         completely.
  1230.  
  1231.     ClearTTX:
  1232.         Clears the TTx registers. This is a test whether a certain
  1233.         board making use of an overclocked LC060 runs with a pure
  1234.         MMU setup.
  1235.  
  1236.     PrintBusError:
  1237.         Prints the location of the access error handler. This should
  1238.         point to the library in case it is installed.
  1239.  
  1240.     ResetBusError:
  1241.         Resets the bus error handler (! Not to be confused with the
  1242.         access error, this is something different if the library is
  1243.         running) to its system default. This tool MUST be run very
  1244.         early, with no debuggers active, or the bus error will be
  1245.         completely messed up.
  1246.  
  1247.     MuContextTest:
  1248.         Checks the MMU context switches by installing a task with
  1249.         a private context. The mmu.library has hence to switch 
  1250.         between two different MMU tables. See above for details
  1251.         how to run this test.
  1252.  
  1253.     MuRemapTest:
  1254.         Checks support of remapped memory by device drivers and
  1255.         the remaining system. Must be run with a temporary file
  1256.         on the harddisk to be checked. THIS TEST WON'T RETURN!
  1257.  
  1258.     CheckFPU:
  1259.           This program prints the version number of a 68040 FPU if 
  1260.         one is available. Two versions exist, the V40 "original" 
  1261.         which is very buggy and the V41 "revised" with less bugs. 
  1262.         The 68040.library supports currently both, with lots of 
  1263.         workarounds for the V40. Please contact me in case you 
  1264.         find a V40 edition in your Amiga.
  1265.  
  1266.     
  1267. Known bugs and problems of this implementation:
  1268. -----------------------------------------------
  1269.  
  1270. Things that require testing:
  1271.  
  1272.     - TTx register parsing updated, again. Should work fine with all the
  1273.       printouts I've collected, but you may still want to test it.
  1274.     - 68851 code likely untested, but I'm getting better. 
  1275.       I NEED YOUR HELP!
  1276.     - GetPageProperties/SetPageProperties are likely tested by the
  1277.       MuGuardianAngel program.
  1278.     - Page access exception handlers only likely tested by 
  1279.       MuGuardianAngel.
  1280.  
  1281. Things not yet implemented:
  1282.  
  1283.     - Patches for ppc libraries due to missing support. The
  1284.       ppc.library will remain unsupported, if you're the owner of
  1285.       a PPC board, run WarpOs, which is compatible.
  1286.  
  1287. Things the current design does not allow:
  1288.  
  1289.     - The MAPP_USED and MAPP_MODIFIED flags are not kept consistent
  1290.       by the library except for MAPP_SINGLE pages. I consider this
  1291.       as a minor problem since single page mode is required for
  1292.       virtual memory anyways.
  1293.     - MMU tables using the function codes. The amiga design shouldn't
  1294.       allow this anyways, but I don't know whether there's a board
  1295.       that makes use of them. (Doesn't look like, though).
  1296.     - Boards with two different MMU's on board. I've heard some
  1297.       rumours that there are actually 68040 boards with an additional
  1298.       68851. 
  1299.  
  1300. Debugging:
  1301. ----------
  1302.  
  1303. Yes, that's a problem of its own. Obviously, the MMU library uses some
  1304. "heavy magic" supervisor code which is not available for a standard monitor.
  1305. Even though the DevPac "MonAm" is a nice and powerful debugger, it's not
  1306. powerful enough for these tricks. There's currently - up to my knowledge -
  1307. only one debugger that can do this for you, and that's my own... (-;
  1308.  
  1309. Check the Aminet and my web-page for COP, then read the documentation. If,
  1310. after reading, you STILL want to use it, you're the right guy for this
  1311. job... (-;
  1312. COP might be setup to load the symbols of the library, to help you a bit.
  1313.  
  1314. The latest available version of COP is 1.73. Try to get the latest, if 
  1315. possible.
  1316.  
  1317. Recommended reading:
  1318. --------------------
  1319.  
  1320. The following books are recommended reading:
  1321.  
  1322.  
  1323. Motorola 68030 Enhanced 32-bit Microprocessor User's Manual    
  1324.     MC68030UM/AD Rev.3
  1325.  
  1326. Motorola 68040 User's Manual                    
  1327.     M68040UM/AD Rev.1
  1328.  
  1329. Motorola 68060 User's Manual                    
  1330.     M68060UM/AD Rev.1
  1331.  
  1332. Motorola M68000 Family Programmer's Reference Manual        
  1333.     M68000PM/AD Rev.1
  1334.  
  1335. Amiga Hardware Reference Manual, 3rd ed.
  1336.     Addison-Wesley Publishing Company, Inc.
  1337.     ISBN 0-201-56776-8
  1338.  
  1339. Amiga ROM Kernal Reference Manual, 3rd ed., Volume "Libraries"
  1340.     Addison-Wesley Publising Company, Inc.
  1341.     ISBN 0-201-56774-1
  1342.  
  1343. The Amiga Guru Book, 2nd Ed.
  1344.     Ralph Babel, Taunusstein 1989,1993
  1345.  
  1346. Additional sources:
  1347.     The Amiga Developer CD V1.1 
  1348.  
  1349.     The Enforcer.guide.
  1350.  
  1351.     Michael Sinz's documentation in the AmigaMail, on the DevCD 1.1.
  1352.  
  1353. Final words:
  1354. ------------
  1355.  
  1356. The mmu.library and the memory library will be my last project for the Amiga. 
  1357. It depends a bit on what happens with the Amiga in the next two years whether 
  1358. a PPC version of this library is required or not; hence, after all, this
  1359. can't be much more than a toy project that came several years too late.
  1360.  
  1361. So long,
  1362.     Thomas
  1363.